package com.wuren.faceSwiping.sExtension.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wuren.faceSwiping.helper.vo.ResponseBean;
import com.wuren.faceSwiping.sExtension.service.SExtensionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sExtension")
@CrossOrigin("*")
public class SExtensionController {
    @Autowired
    private SExtensionService sExtensionService;

    @PostMapping("/findAll")
    public ResponseBean findAll(int id ){
        QueryWrapper q = new QueryWrapper();
        if (id!=0){
            q.eq("id",id);
        }
        return  new ResponseBean(200,0,sExtensionService.list(q));
    }

}
